﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/assets/libs/layui/css/layui.css" />
    <link rel="stylesheet" href="/assets/module/admin.css?v=318">
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        .form-div {
            padding: 5px;
            background-color: white;
        }
    </style>
</head>
<body>
    <div class="layui-row form-div">
        <form id="dataform" lay-filter="dataform" class="layui-form model-form">
            <blockquote class="layui-elem-quote">机构基本信息</blockquote>

            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">机构名称</label>
                    <div class="layui-input-block">
                        <input id="name" name="Name" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips" lay-verify="required" required>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">机构编码</label>
                    <div class="layui-input-block">
                        <input id="code" name="Code" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">登录账号</label>
                    <div class="layui-input-block">
                        <input id="loginName" name="LoginName" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">登录密码</label>
                    <div class="layui-input-block">
                        <input id="loginPass" name="LoginPass" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm12">
                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">所属区域</label>
                    <div class="layui-input-block">
                        <input id="belongArea" name="BelongArea" autocomplete="off" type="text" placeholder="请选择所属区域" class="layui-input" lay-verType="tips" lay-verify="required" required>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">地址</label>
                    <div class="layui-input-block">
                        <input id="addresss" name="Addresss" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">网址</label>
                    <div class="layui-input-block">
                        <input id="uRL" name="URL" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">邮箱</label>
                    <div class="layui-input-block">
                        <input id="eMail" name="EMail" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">机构类型</label>
                    <div class="layui-input-block">
                        <!--<input type="radio" name="OrganizationType" value=0 title="居家养老" checked>-->
                        <input type="radio" name="OrganizationType" value=1 title="机构养老" checked>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">机构等级</label>
                    <div class="layui-input-block">
                        <select name="OrganizationLevel" id="OrganizationLevel" lay-search="">
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">对外电话</label>
                    <div class="layui-input-block">
                        <input id="telephone" name="Telephone" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">开业时间</label>
                    <div class="layui-input-block">
                        <input id="openingDate" name="OpeningDate" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">所处位置</label>
                    <div class="layui-input-block">
                        <select name="LocationType" id="LocationType" lay-search="">
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">机构负责人</label>
                    <div class="layui-input-block">
                        <input id="principalName" name="PrincipalName" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">机构负责人电话</label>
                    <div class="layui-input-block">
                        <input id="principalMobile" name="PrincipalMobile" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">法人代表</label>
                    <div class="layui-input-block">
                        <input id="legalPerson" name="LegalPerson" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">法人代表电话</label>
                    <div class="layui-input-block">
                        <input id="legalPersonMobile" name="LegalPersonMobile" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm12">
                <div class="layui-form-item">
                    <label class="layui-form-label">营业执照</label>
                    <div class="layui-input-block layui-upload">
                        <button type="button" class="layui-btn layui-btn-normal" id="BusinessLicensePicselect">选择文件</button>
                        <button type="button" class="layui-btn" id="BusinessLicensePicAction" lay-verType="tips" lay-verify="BusinessLicensePicRequired">开始上传</button>
                        <div class="layui-upload-list">
                            <input type="hidden" id="HdBusinessLicensePic" />
                            <table class="layui-table">
                                <thead>
                                    <tr>
                                        <th>预览图</th>
                                        <th>大小</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id="BusinessLicensePic"></tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">养老机构许可证</label>
                    <div class="layui-input-block">
                        <input id="institutionLicense" name="InstitutionLicense" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">社会信用代码</label>
                    <div class="layui-input-block">
                        <input id="creditCode" name="CreditCode" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">是否具有卫生许可证</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsHygieneLicense" value="true" title="有" checked>
                        <input type="radio" name="IsHygieneLicense" value="false" title="无">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">医疗服务方式</label>
                    <div class="layui-input-block">

                        <select name="MedicalServiceMode" id="MedicalServiceMode" lay-search="">
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">是否具备医保定点资格</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsMedicalInsuranceQualification" value="true" title="有" checked>
                        <input type="radio" name="IsMedicalInsuranceQualification" value="false" title="无">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">机构用房来源</label>
                    <div class="layui-input-block">

                        <select name="OrgHousingSource" id="OrgHousingSource" lay-search="">
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">是否投保养老机构责任险</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsInsurance" value="true" title="有" checked>
                        <input type="radio" name="IsInsurance" value="false" title="无">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm12">
                <div class="layui-form-item">
                    <label class="layui-form-label">机构图片</label>
                    <div class="layui-input-block layui-upload">
                        <button type="button" class="layui-btn layui-btn-normal" id="OrgPicselect">选择文件</button>
                        <button type="button" class="layui-btn" id="OrgPicAction" lay-verType="tips" lay-verify="OrgPicRequired">开始上传</button>
                        <div class="layui-upload-list">
                            <input type="hidden" id="HdOrgPic" />
                            <table class="layui-table">
                                <thead>
                                    <tr>
                                        <th>预览图</th>
                                        <th>大小</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id="OrgPic"></tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">机构大类</label>
                    <div class="layui-input-block">

                        <select name="OrgFirstType" id="OrgFirstType" lay-search="" lay-filter="OrgFirstType">
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">机构小类</label>
                    <div class="layui-input-block">

                        <select name="OrgSecondType" id="OrgSecondType" lay-search="">
                        </select>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">是否公建民营</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsPublic" value="true" title="是" checked>
                        <input type="radio" name="IsPublic" value="false" title="否">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">是否设医疗机构</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsMedicalOrg" value="true" title="是" checked>
                        <input type="radio" name="IsMedicalOrg" value="false" title="否">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">是否医养合作机制</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsMedicalAndCare" value="true" title="是" checked>
                        <input type="radio" name="IsMedicalAndCare" value="false" title="否">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">服务覆盖老人数</label>
                    <div class="layui-input-block">
                        <input id="serviceElderlyCount" name="ServiceElderlyCount" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>

            <div class="layui-col-sm12">
                <div class="layui-form-item">
                    <label class="layui-form-label">资质证明材料</label>
                    <div class="layui-input-block layui-upload">
                        <button type="button" class="layui-btn layui-btn-normal" id="QualificationCertificatePicselect">选择文件</button>
                        <button type="button" class="layui-btn" id="QualificationCertificatePicAction" lay-verType="tips" lay-verify="QualificationCertificatePicRequired">开始上传</button>
                        <div class="layui-upload-list">
                            <input type="hidden" id="HdQualificationCertificatePic" />
                            <table class="layui-table">
                                <thead>
                                    <tr>
                                        <th>预览图</th>
                                        <th>大小</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id="QualificationCertificatePic"></tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm12">
                <div class="layui-form-item">
                    <label class="layui-form-label">所获荣誉图片</label>
                    <div class="layui-input-block layui-upload">
                        <button type="button" class="layui-btn layui-btn-normal" id="HonorPicselect">选择文件</button>
                        <button type="button" class="layui-btn" id="HonorPicAction" lay-verType="tips" lay-verify="HonorPicRequired">开始上传</button>
                        <div class="layui-upload-list">
                            <input type="hidden" id="HdHonorPic" />
                            <table class="layui-table">
                                <thead>
                                    <tr>
                                        <th>预览图</th>
                                        <th>大小</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id="HonorPic"></tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">所获荣誉</label>
                    <div class="layui-input-block">
                        <input id="honorDesc" name="HonorDesc" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">站点类型</label>
                    <div class="layui-input-block">

                        <input type="radio" name="StationType" value=1 title="服务中心" checked>
                        <input type="radio" name="StationType" value=0 title="服务站">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">有无设置床位</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsBed" value="true" title="有" checked>
                        <input type="radio" name="IsBed" value="false" title="无">
                    </div>
                </div>
            </div>

            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">是否开设助餐服务</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsMealService" value="true" title="有" checked>
                        <input type="radio" name="IsMealService" value="false" title="无">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm12">
                <div class="layui-form-item">
                    <label class="layui-form-label">机构简介</label>
                    <div class="layui-input-block">

                        <textarea name="Desc" id="desc" placeholder="请输入1000字以内的简介" class="layui-textarea" lay-verify="required" maxlength="1000"></textarea>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm12">
                <blockquote class="layui-elem-quote">机构房屋场地信息</blockquote>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">实际投入建设资金</label>
                    <div class="layui-input-block">
                        <input id="actualBuildFund" name="ActualBuildFund" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">建设补助资金</label>
                    <div class="layui-input-block">
                        <input id="buildAllowance" name="BuildAllowance" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">员工人数</label>
                    <div class="layui-input-block">
                        <input id="employeeCount" name="EmployeeCount" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>

            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">房屋类型</label>
                    <div class="layui-input-block">

                        <input type="radio" name="BulidType" value=1 title="楼房" checked>
                        <input type="radio" name="BulidType" value=0 title="平房">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">房屋建设时间</label>
                    <div class="layui-input-block">
                        <input id="buildYear" name="BuildYear" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">占地面积</label>
                    <div class="layui-input-block">
                        <input id="coveredArea" name="CoveredArea" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">建筑面积</label>
                    <div class="layui-input-block">
                        <input id="buildArea" name="BuildArea" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">卫生间个数</label>
                    <div class="layui-input-block">
                        <input id="toiletCount" name="ToiletCount" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">是否有开设呼叫中心</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsCallCenter" value="true" title="有" checked>
                        <input type="radio" name="IsCallCenter" value="false" title="无">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">服务对象房间总数</label>
                    <div class="layui-input-block">
                        <input id="servicePersonRoomsCount" name="ServicePersonRoomsCount" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">服务床位总数</label>
                    <div class="layui-input-block">
                        <input id="BedCount" name="BedCount" autocomplete="off" type="text" placeholder="请输入" class="layui-input" lay-verType="tips">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">户外活动场地</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsOutDoorsArea" value="true" title="有" checked>
                        <input type="radio" name="IsOutDoorsArea" value="false" title="没有">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">种植场地</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsPlantArea" value="true" title="有" checked>
                        <input type="radio" name="IsPlantArea" value="false" title="没有">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">养殖场地</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsBreadArea" value="true" title="有" checked>
                        <input type="radio" name="IsBreadArea" value="false" title="没有">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">设有消防控制室</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsFireControlRooms" value="true" title="有" checked>
                        <input type="radio" name="IsFireControlRooms" value="false" title="没有">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">停车场</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsParking" value="true" title="有" checked>
                        <input type="radio" name="IsParking" value="false" title="没有">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6">
                <div class="layui-form-item">
                    <label class="layui-form-label">是否开展居家和社区养老服务</label>
                    <div class="layui-input-block">

                        <input type="radio" name="IsCommuntityService" value="true" title="有" checked>
                        <input type="radio" name="IsCommuntityService" value="false" title="没有">
                    </div>
                </div>
            </div>
            <div class="layui-col-sm12">
                <div class="layui-form-item">
                    <label class="layui-form-label">楼层平面图</label>
                    <div class="layui-input-block layui-upload">
                        <button type="button" class="layui-btn layui-btn-normal" id="BuildPicselect">选择文件</button>
                        <button type="button" class="layui-btn" id="BuildPicAction" lay-verType="tips" lay-verify="BuildPicRequired">开始上传</button>
                        <div class="layui-upload-list">
                            <input type="hidden" id="HdBuildPic" />
                            <table class="layui-table">
                                <thead>
                                    <tr>
                                        <th>预览图</th>
                                        <th>大小</th>
                                        <th>状态</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody id="BuildPic"></tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm12">
                <blockquote class="layui-elem-quote">机构设施设备信息</blockquote>
            </div>
            <div class="layui-col-sm12">
                <label class="layui-form-label" style="width:120px">公共服务用房:</label>
                <div class="layui-input-block" id="chkPublicServiceRoom" style="margin-top:10px">
                </div>
            </div>
            <div class="layui-col-sm12">
                <label class="layui-form-label" style="width:120px">医疗康复用房:</label>
                <div class="layui-input-block" id="chkMedicalRoom" style="margin-top:10px">
                </div>
            </div>
            <div class="layui-col-sm12">
                <label class="layui-form-label" style="width:120px">文化娱乐用房:</label>
                <div class="layui-input-block" id="chkCultureRoom" style="margin-top:10px">
                </div>
            </div>
            <div class="layui-col-sm12">
                <label class="layui-form-label" style="width:120px">行政辅助用房:</label>
                <div class="layui-input-block" id="chkAssistRoom" style="margin-top:10px">
                </div>
            </div>
            <div class="layui-col-sm12">
                <label class="layui-form-label" style="width:120px">房间设备:</label>
                <div class="layui-input-block" id="chkRoomDevice" style="margin-top:10px">
                </div>
            </div>
            <div class="layui-col-sm12">
                <label class="layui-form-label" style="width:120px">公共服务设备:</label>
                <div class="layui-input-block" id="chkPublicDevice" style="margin-top:10px">
                </div>
            </div>
            <div class="layui-col-sm12">
                <label class="layui-form-label" style="width:120px">医疗康复设备:</label>
                <div class="layui-input-block" id="chkMedicalDevice" style="margin-top:10px">
                </div>
            </div>
            <div class="layui-col-sm12">
                <label class="layui-form-label" style="width:120px">安全保障设备:</label>
                <div class="layui-input-block" id="chkSafeDevice" style="margin-top:10px">
                </div>
            </div>
            <div class="layui-col-sm12">
                <label class="layui-form-label" style="width:120px">消防安全设备:</label>
                <div class="layui-input-block" id="chkFireControlDevice" style="margin-top:10px">
                </div>
            </div>
            <div class="layui-col-sm12">
                <label class="layui-form-label" style="width:120px">行政办公设备:</label>
                <div class="layui-input-block" id="chkOfficeDevice" style="margin-top:10px">
                </div>
            </div>
            <div class="layui-form-item text-right">
                <button class="layui-btn" lay-filter="formSubmit" lay-submit>保存</button>
                <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
            </div>
        </form>
    </div>

    <!-- 初始加载动画 -->
    <div class="page-loading">
        <div class="signal-loader">
            <span></span><span></span><span></span><span></span>
        </div>
    </div>

    <!-- js部分 -->
    <script src="/assets/libs/jquery/jquery-3.2.1.min.js"></script>
    <script src="/assets/libs/layui/layui.js"></script>
    <script src="/assets/js/utils.js"></script>
    <script src="/assets/js/main.js"></script>
    <!--行政区域数据（宿州）-->
    <script src="/assets/module/cascader/citys-data-suzhou.js"></script>
    <script type="text/javascript">
        var id = getRequestData("id");

        layui.use(['layer', 'form', 'admin', 'laydate', 'formX', 'cascader'], function () {
            var layer = layui.layer;
            var form = layui.form;
            var admin = layui.admin;
            var formX = layui.formX;
            var laydate = layui.laydate;
            var cascader = layui.cascader;
            var upload = layui.upload;
           // 时间弹窗模板
            laydate.render({
                elem: '#openingDate'
                , type: 'date'
                , trigger: 'click'
                , isInitValue: false //初始值不填充
              
                , btns: ['clear', 'confirm']
            });
           
            //地区选择
            var city = cascader.render({
                elem: '#belongArea',
                data: citysData,
                itemHeight: '250px',
                filterable: true
            });

            admin.req("/SystemManage/DataDictDetail/GetListJsonForSelect", { DictTypes: 'OrganizationLevel,LocationType,MedicalServiceMode,OrgHousingSource,PublicServiceRoom,MedicalRoom,CultureRoom,AssistRoom,RoomDevice,PublicServiceDevice,MedicalDevice,SafeDevice,FireControlDevice,OfficeDevice,OrgFirstType' }, function (res) {
                if (res.Tag == 1) {
                    formX.renderSelect({
                        elem: '#OrganizationLevel',
                        data: res.Data.filter(function (item) {
                            if (item.DictType == 'OrganizationLevel') {
                                return item;
                            }
                        })[0].data,
                        name: 'DictValue',
                        value: 'DictKey',
                        hint: '请选择机构等级',
                        initValue: 0,
                        done: function () { }
                    });
                    formX.renderSelect({
                        elem: '#LocationType',
                        data: res.Data.filter(function (item) {
                            if (item.DictType == 'LocationType') {
                                return item;
                            }
                        })[0].data,
                        name: 'DictValue',
                        value: 'DictKey',
                        hint: '请选择所处位置',
                        initValue: 0,
                        done: function () { }
                    });
                    formX.renderSelect({
                        elem: '#MedicalServiceMode',
                        data: res.Data.filter(function (item) {
                            if (item.DictType == 'MedicalServiceMode') {
                                return item;
                            }
                        })[0].data,
                        name: 'DictValue',
                        value: 'DictKey',
                        hint: '请选择医疗服务方式',
                        initValue: 0,
                        done: function () { }
                    });
                    formX.renderSelect({
                        elem: '#OrgHousingSource',
                        data: res.Data.filter(function (item) {
                            if (item.DictType == 'OrgHousingSource') {
                                return item;
                            }
                        })[0].data,
                        name: 'DictValue',
                        value: 'DictKey',
                        hint: '请选择机构用房来源',
                        initValue: 0,
                        done: function () { }
                    });

                    formX.renderSelect({
                        elem: '#OrgFirstType',
                        data: res.Data.filter(function (item) {
                            if (item.DictType == 'OrgFirstType') {
                                return item;
                            }
                        })[0].data,
                        name: 'DictValue',
                        value: 'DictKey',
                        hint: '请选择机构大类',
                        initValue: 0,
                        done: function () { }
                    });

                    setLayuiCheckbox(form, "chkPublicServiceRoom", 'chkPublicServiceRoom', res.Data.filter(function (item) {
                        if (item.DictType == 'PublicServiceRoom') {
                            return item;
                        }
                    })[0].data, 'DictValue', 'DictKey');
                    setLayuiCheckbox(form, "chkMedicalRoom", 'chkMedicalRoom', res.Data.filter(function (item) {
                        if (item.DictType == 'MedicalRoom') {
                            return item;
                        }
                    })[0].data, 'DictValue', 'DictKey');

                    setLayuiCheckbox(form, "chkCultureRoom", 'chkCultureRoom', res.Data.filter(function (item) {
                        if (item.DictType == 'CultureRoom') {
                            return item;
                        }
                    })[0].data, 'DictValue', 'DictKey');
                    setLayuiCheckbox(form, "chkAssistRoom", 'chkAssistRoom', res.Data.filter(function (item) {
                        if (item.DictType == 'AssistRoom') {
                            return item;
                        }
                    })[0].data, 'DictValue', 'DictKey');

                    setLayuiCheckbox(form, "chkRoomDevice", 'chkRoomDevice', res.Data.filter(function (item) {
                        if (item.DictType == 'RoomDevice') {
                            return item;
                        }
                    })[0].data, 'DictValue', 'DictKey');

                    setLayuiCheckbox(form, "chkPublicDevice", 'chkPublicDevice', res.Data.filter(function (item) {
                        if (item.DictType == 'PublicServiceDevice') {
                            return item;
                        }
                    })[0].data, 'DictValue', 'DictKey');
                    
                    setLayuiCheckbox(form, "chkMedicalDevice", 'chkMedicalDevice', res.Data.filter(function (item) {
                        if (item.DictType == 'MedicalDevice') {
                            return item;
                        }
                    })[0].data, 'DictValue', 'DictKey');

                    setLayuiCheckbox(form, "chkSafeDevice", 'chkSafeDevice', res.Data.filter(function (item) {
                        if (item.DictType == 'SafeDevice') {
                            return item;
                        }
                    })[0].data, 'DictValue', 'DictKey');
                    setLayuiCheckbox(form, "chkFireControlDevice", 'chkFireControlDevice', res.Data.filter(function (item) {
                        if (item.DictType == 'FireControlDevice') {
                            return item;
                        }
                    })[0].data, 'DictValue', 'DictKey');
                    setLayuiCheckbox(form, "chkOfficeDevice", 'chkOfficeDevice', res.Data.filter(function (item) {
                        if (item.DictType == 'OfficeDevice') {
                            return item;
                        }
                    })[0].data, 'DictValue', 'DictKey');

                }
            }, 'get', { async: false });

            initPic('BusinessLicensePic', 'BusinessLicensePicselect', 7, 'BusinessLicensePicAction', 'HdBusinessLicensePic');
            initPic('OrgPic', 'OrgPicselect', 7, 'OrgPicAction', 'HdOrgPic');
            initPic('BuildPic', 'BuildPicselect', 7, 'BuildPicAction', 'HdBuildPic');
            initPic('QualificationCertificatePic', 'QualificationCertificatePicselect', 7, 'QualificationCertificatePicAction', 'HdQualificationCertificatePic');
            initPic('HonorPic', 'HonorPicselect', 7, 'HonorPicAction', 'HdHonorPic');

            // 初始化
            if (id > 0) {
                admin.req('/OrganizationManage/Organizations/GetFormJson', { id: id }, function (res) {
                    admin.removeLoading();
                    if (res.Tag == 1) {
                        form.val('dataform', res.Data);

                        modifyInitPic('HdBusinessLicensePic', res.Data.BusinessLicensePic, 'BusinessLicensePic');
                        modifyInitPic('HdOrgPic', res.Data.OrgPic, 'OrgPic');
                        modifyInitPic('HdBuildPic', res.Data.BuildPic, 'BuildPic');
                        modifyInitPic('HdQualificationCertificatePic', res.Data.QualificationCertificatePic, 'QualificationCertificatePic');
                        modifyInitPic('HdHonorPic', res.Data.HonorPic, 'HonorPic');

                        city.setValue(res.Data.BelongArea); 
                        setChkInitValue('chkPublicServiceRoom', res.Data.PublicServiceRoom==null?"":res.Data.PublicServiceRoom.split(','));
                        setChkInitValue('chkMedicalRoom', res.Data.MedicalRoom == null ? "" :res.Data.MedicalRoom.split(','));
                        setChkInitValue('chkCultureRoom', res.Data.CultureRoom == null ? "" :res.Data.CultureRoom.split(','));
                        setChkInitValue('chkAssistRoom', res.Data.AssistRoom == null ? "" :res.Data.AssistRoom.split(','));
                        setChkInitValue('chkRoomDevice', res.Data.RoomDevice == null ? "" :res.Data.RoomDevice.split(','));
                        setChkInitValue('chkPublicDevice', res.Data.PublicDevice == null ? "" :res.Data.PublicDevice.split(','));
                        setChkInitValue('chkMedicalDevice', res.Data.MedicalDevice == null ? "" :res.Data.MedicalDevice.split(','));
                        setChkInitValue('chkSafeDevice', res.Data.SafeDevice == null ? "" :res.Data.SafeDevice.split(','));
                        setChkInitValue('chkFireControlDevice', res.Data.FireControlDevice == null ? "" :res.Data.FireControlDevice.split(','));
                        setChkInitValue('chkOfficeDevice', res.Data.OfficeDevice == null ? "" :res.Data.OfficeDevice.split(','));
                        form.render('checkbox'); 
                        bindSelect($("#OrgFirstType option:selected").text(), res.Data.OrgSecondType);
                    }
                }, 'get');
            } else {
                admin.removeLoading();
            }

            form.on('select(OrgFirstType)', function (data) {

                bindSelect(data.elem[data.elem.selectedIndex].text, 0);

            });
            function initPic(tid, selectId, uploadFileType, bindAction, strPics) {
                var arrPics = [];
                var view = $("#" + tid), uploaPics = upload.render({
                    elem: '#' + selectId
                    , headers: { 'Authorization': "Bearer " + layui.setter.getToken().JwtToken }
                    , url: '/ToolManage/FileHelper/UploadFile'
                    , data: { uploadFileType: uploadFileType }
                    , accept: 'images'
                    , multiple: true
                    , auto: false
                    , bindAction: '#' + bindAction
                    , choose: function (obj) {
                        var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
                        //读取本地文件
                        obj.preview(function (index, file, result) {
                            arrPics.push(file);//文件对象，用于提交表单时判断是否已上传
                            var tr = $(['<tr id="upload-' + index + '">'
                                , '<td><img layer-src="' + result + '" src="' + result + '" alt="' + file.name + '" class="layui-upload-img" style="height:50px;"></td>'
                                , '<td>' + (file.size / 1024).toFixed(1) + 'kb</td>'
                                , '<td>等待上传</td>'
                                , '<td>'
                                , '<button class="layui-btn layui-btn-xs demo-reload layui-hide">重传</button>'
                                , '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">删除</button>'
                                , '</td>'
                                , '</tr>'].join(''));
                            //单个重传
                            tr.find('.demo-reload').on('click', function () {
                                obj.upload(index, file);
                            });
                            //删除
                            tr.find('.demo-delete').on('click', function () {
                                delete files[index]; //删除对应的文件
                                tr.remove();
                                uploaPics.config.elem.next()[0].value = ''; //清空 input file 值，以免删除后出现同名文件不可选
                            });
                            view.append(tr);
                        });
                    }
                    , done: function (res, index, upload) {
                        if (res.Tag == 1) { //上传成功
                            var Files = res.Data.Files;
                            $.each(Files, function (index, value) {
                                $("#" + strPics).val($("#" + strPics).val() + value.path + ',');
                            });
                            var tr = view.find('tr#upload-' + index)
                                , tds = tr.children();
                            tds.eq(2).html('<span style="color: #5FB878;">上传成功</span>');
                            tds.eq(3).html(''); //清空操作
                            var upfiles = this.files[index];
                            $.each(upfiles, function (index, value) {//移除提交成功的照片对象
                                arrPics.splice($.inArray(value, arrPics), 1);
                            });
                            return delete upfiles; //删除文件队列已经上传成功的文件
                        }
                        this.error(index, upload);
                    }
                    , error: function (index, upload) {
                        var tr = view.find('tr#upload-' + index)
                            , tds = tr.children();
                        tds.eq(2).html('<span style="color: #FF5722;">上传失败</span>');
                        tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //显示重传
                    }
                });

                // return { uploaPics: uploaPics, strPics: strPics, arrPics: arrPics}
            }
            function modifyInitPic(strPics, picData, tid) {
                $("#" + strPics).val(picData);
                var view = $("#" + tid);
                if (picData != null) {
                    var pics = picData.split(',');
                    for (var i = 0; i < pics.length - 1; i++) {
                        var fileName = pics[i].split('/')[pics[i].split('/').length - 1];
                        var tr = $(['<tr id="upload-' + i + '">'
                            , '<td><img layer-src="' + pics[i] + '" src="' + pics[i] + '" alt="" class="layui-upload-img" style="height:50px;"></td>'
                            , '<td>kb</td>'
                            , '<td><span style="color: #5FB878;">上传成功</span></td>'
                            , '<td>'
                            , '<button class="layui-btn layui-btn-xs demo-reload layui-hide">重传</button>'
                            , '<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete" id="' + pics[i] + '" type="button">删除</button>'
                            , '</td>'
                            , '</tr>'].join(''));
                        //单个重传
                        tr.find('.demo-reload').on('click', function () {
                            obj.upload(index, file);
                        });
                        //删除
                        tr.find('.demo-delete').on('click', function (obj) {
                            // delete files[index]; //删除对应的文件
                            // $("#" + obj.target.id).parent().parent().remove();
                            obj.target.parentNode.parentNode.remove();
                            $("#" + strPics).val($("#" + strPics).val().replace(obj.target.id + ",", ""));
                            //  uploadPics.config.elem.next()[0].value = ''; //清空 input file 值，以免删除后出现同名文件不可选

                        });
                        view.append(tr);
                    }
                }
            }
            function bindSelect(type, initValue) {
                admin.req("/SystemManage/DataDictDetail/GetListJsonForSelect", { DictType: type }, function (res) {
                    if (res.Tag == 1) {
                        formX.renderSelect({
                            elem: '#OrgSecondType',
                            data: res.Data[0].data,
                            name: 'DictValue',
                            value: 'DictKey',
                            hint: '请选择机构小类',
                            initValue: initValue,
                            done: function () { }
                        });

                    }
                }, 'get', { async: false });
            }

            function setChkInitValue(tagName, initValue) {
                var chk = $("input[name='"+tagName+"']");
                for (var j = 0; j < initValue.length; j++) {
                    for (var i = 0; i < chk.length; i++) {
                        if (chk[i].value == initValue[j]) {
                            chk[i].checked = true;//设置选中项
                        }
                    }
                }
            }
            // 表单提交
            form.on('submit(formSubmit)', function (data) {
                data.field.Id = id;
                data.field.BusinessLicensePic = $("#HdBusinessLicensePic").val();
                data.field.OrgPic = $("#HdOrgPic").val();
                data.field.BuildPic = $("#HdBuildPic").val();
                data.field.QualificationCertificatePic = $("#HdQualificationCertificatePic").val();
                data.field.HonorPic = $("#HdHonorPic").val();
                var publicServiceRoomData = [];
                var MedicalRoomData = [];
                var CultureRoomData = [];
                var AssistRoomData = [];
                var RoomDeviceData = [];
                var PublicDeviceData = [];
                var SafeDeviceData = [];
                var MedicalDeviceData = [];
                var FireControlDeviceData = [];
                var OfficeDeviceData = [];
                $('input[name=chkPublicServiceRoom]:checked').each(function () {
                    publicServiceRoomData.push($(this).val());
                });
                $('input[name=chkMedicalRoom]:checked').each(function () {
                    MedicalRoomData.push($(this).val());
                });
                $('input[name=chkAssistRoom]:checked').each(function () {
                    AssistRoomData.push($(this).val());
                });
                $('input[name=chkCultureRoom]:checked').each(function () {
                    CultureRoomData.push($(this).val());
                });
                $('input[name=chkRoomDevice]:checked').each(function () {
                    RoomDeviceData.push($(this).val());
                });
                $('input[name=chkPublicDevice]:checked').each(function () {
                    PublicDeviceData.push($(this).val());
                });
                $('input[name=chkMedicalDevice]:checked').each(function () {
                    MedicalDeviceData.push($(this).val());
                });
                $('input[name=chkSafeDevice]:checked').each(function () {
                    SafeDeviceData.push($(this).val());
                });
                $('input[name=chkFireControlDevice]:checked').each(function () {
                   FireControlDeviceData.push($(this).val());
                });

                $('input[name=chkOfficeDevice]:checked').each(function () {
                    OfficeDeviceData.push($(this).val());
                });

                data.field.PublicServiceRoom = publicServiceRoomData.toString();
                data.field.MedicalRoom = MedicalRoomData.toString();
                data.field.AssistRoom = AssistRoomData.toString();
                data.field.CultureRoom = CultureRoomData.toString();
                data.field.RoomDevice = RoomDeviceData.toString();
                data.field.PublicDevice = PublicDeviceData.toString();
                data.field.MedicalDevice = MedicalDeviceData.toString();
                data.field.SafeDevice = SafeDeviceData.toString();
                data.field.FireControlDevice = FireControlDeviceData.toString();
                data.field.OfficeDevice = OfficeDeviceData.toString();
                admin.showLoading('body', 3, '.8');

                admin.req('/OrganizationManage/Organizations/SaveFormJson', data.field, function (res) {
                    admin.removeLoading('body', true, true);
                    if (res.Tag == 1) {
                        parent.layer.msg('操作成功', { icon: 1, time: 1500 });
                        parent.table.reload('gridTable');
                        parent.layer.close(parent.layer.getFrameIndex(window.name));
                    }
                    else {
                        layer.msg(res.Message, { icon: 2 });
                    }
                }, 'post');

                return false;
            });

        });
    </script>
</body>
</html>